5 if [ -f "clients/$id" ]; then
6 read -r address hourly <"clients/$id"
8 [ "$address" ] || address="address="
9 [ "$hourly" ] || hourly="hourly="
11 [form method="POST" action="/update_client"
13 <textarea name="address" placeholder="address">
15 [label for=hourly Hourly Rate:]
16 [input #hourly type=number name=hourly value="%s"]
17 [submit "update" "%s" Update]
20 "$(UNSTRING "${address#address=}" |HTML)" \
21 "$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')" \
22 "$(tid "clients/$id")"
26 [ -d clients/ ] && for c in clients/*; do
27 read -r address hourly <"$c"
28 address="$(UNSTRING "${address#address=}")"
29 [ "$address" ] || address="(no address)"
30 printf '[div .client .address <!--
33 [label Hourly Rate:] %s€
34 [a href="/clients/%s" Edit]]
35 ' "$(HTML "$address")" \
36 "$(HTML "${hourly#hourly=}")" \
37 "$(HTML "${c#clients/}")"
42 local id="$(POST id |checkid)"
43 if [ "$(POST update)" = "$(tid "clients/$id")" ]; then
45 printf 'address=%s hourly=%s' \
46 "$(POST address |STRING)" "$(POST hourly |STRING)" \
50 error Invalid Data "$id" "$(POST update)"
51 REDIRECT "/clients/$1"